# Contributor: Thomas Boerger <thomas@webhippie.de>
# Maintainer: Thomas Boerger <thomas@webhippie.de>
pkgname=cloudfoundry-cli
pkgver=6.51.0
pkgrel=1
pkgdesc="A CLI for Cloud Foundry written in Go"
url="https://github.com/cloudfoundry/cli"
arch="all !s390x !armv7"
license="Apache-2.0"
makedepends="go bash"
source="$pkgname-$pkgver.tar.gz::https://github.com/cloudfoundry/cli/archive/v$pkgver.tar.gz"
builddir="$srcdir/cli-$pkgver"

build() {
	mkdir -p src/code.cloudfoundry.org/
	ln -fs "$builddir" src/code.cloudfoundry.org/cli

	cd src/code.cloudfoundry.org/cli
	GOPATH="$builddir" make build
}

package() {
	mkdir -p "$pkgdir"/usr/bin
	install -Dm755 out/cf out/cf6 \
		"$pkgdir"/usr/bin
}

sha512sums="434702d2dc1f1c6727fe7a8a39eb91730d228cf2dfbdf294b68212b1e5cf362032ade26461d2e6951e1eadfc2884a8358f89ec42ddab9c3bb2279a87d3cb6719  cloudfoundry-cli-6.51.0.tar.gz"
